<template>
	<view>
		<view class="fund-header">
			<view class="layout">				
				<view class="fund-header-backend" @click="handleBackendButton()">
					<image src="/static/icon/icon-back.png"></image>
				</view>
				<view class="fund-header-tooltip">
					专属二维码
				</view>
				<view class="fund-header-more">
					<image src="/static/icon/icon-moer.png"></image>
				</view>
			</view>
		</view>
		<view class="tooltip">添加福利官</view>
		<view class="qrcode">
			<image :src="agentData.agentQrcode"></image>
		</view>
		<view class="qrcode-scan-button">长按识别二维码添加</view>
		<view class="qrcode-tooltip">投资有风险，入市需谨慎</view>
	</view> 
</template>

<script>
	export default {
		data() {
			return {
				agentData:{}
			}
		},
		onLoad() {
			
		},
		onShow() {
			let _this = this;
			_this.$distribution.getAgentDetail().then(res=>{
				console.log(res)
				if(res.code == 200){
					_this.agentData = res.data;
				}
			})
		},
		methods: {
			handleBackendButton:function(){
				uni.redirectTo({
					url:"/pages/distribution/main/main"
				})
			},
			
		}
	}
</script>

<style>
page { padding-top: 100rpx; padding-bottom: 120rpx; background: #ededed; font-size: 14px; }
.fund-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; }
.fund-header { background: #fff; padding: 15rpx; }

.fund-header-backend { width: 50rpx; height: 40rpx; }
.fund-header-tooltip { width: 600rpx; text-align: center; }
.fund-header-more { width: 50rpx; height: 40rpx; }
.tooltip { padding:30rpx 0; font-size:24px; text-align: center; }
.qrcode { height: 300rpx; width: 300rpx; margin: 50rpx auto; }

.qrcode-scan-button { background: #f30; border-radius: 80rpx; width: 600rpx; margin: 0 auto; }
.qrcode-scan-button { text-align: center; padding: 20rpx 0; color: #fff; font-size: 16px; }
.qrcode-tooltip { padding:25rpx 0; text-align:center; }
</style>
